Skip to content

Optimize compilation with Ninja#31449

Merged
zhwesky2010 merged 6 commits intoPaddlePaddle:developfrom
Avin0323:optimize-compilation-with-ninja
Mar 16, 2021
Merged

Optimize compilation with Ninja#31449
zhwesky2010 merged 6 commits intoPaddlePaddle:developfrom
Avin0323:optimize-compilation-with-ninja

Conversation

@Avin0323
Copy link
Contributor

@Avin0323 Avin0323 commented Mar 5, 2021

PR types

Others

PR changes

Others

Describe

Windows下,对比MSVC,使用Ninja构建缺少/Zc:inline编译参数,手动添加。

/Zc:inline:删除不用的函数符号。

测试日志:https://xly.bce.baidu.com/paddlepaddle/paddle/newipipe/detail/2508529/job/3505578

@paddle-bot-old
Copy link

paddle-bot-old bot commented Mar 5, 2021

Hi, It's a test PR, it will not trigger CI. If you want to trigger CI, please remove notest in your commit message.

@Avin0323 Avin0323 changed the title [WIP]Optimize compilation with Ninja Optimize compilation with Ninja Mar 12, 2021
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
-DCMAKE_C_FLAGS=$<FILTER:${CMAKE_C_FLAGS},EXCLUDE,/Zc:inline>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么做特殊处理呢?warpctc和其他第三方有特殊地方吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warpctc会将CXX FLAGS用在编译CUDA上,这样会导致缺少部分device函数。

Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
还有一些Ninja无法识别的warning,后面可以一起处理下

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhwesky2010 zhwesky2010 merged commit 41e9ecf into PaddlePaddle:develop Mar 16, 2021
@Avin0323 Avin0323 deleted the optimize-compilation-with-ninja branch March 30, 2021 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants